package com.eastfair.venueservice.vo;

import com.eastfair.annotation.annotation.dictionary.Dict;
import com.eastfair.annotation.annotation.vo.VoInfo;
import com.eastfair.annotation.model.BaseVoGroupClass;
import com.eastfair.common.vo.AttachmentFileVO;
import com.eastfair.venueservice.entity.ServiceItemOrg;
import com.eastfair.venueservice.enumeration.ServiceItemAuditStateEnum;
import com.eastfair.venueservice.enumeration.ServiceItemServiceStateEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 实体类
 * 服务项
 * </p>
 *
 * @author linan
 * @since 2022-07-13
 */
@Data
@ApiModel(value = "ServiceItemVO", description = "服务项")
public class ServiceItemVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {BaseVoGroupClass.all.class,Simple.class})
    private Long id;

    /**
     * 来源服务id
     */
    @ApiModelProperty(value = "来源服务id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long sourceId;
    /**
     * 来源系统
     */
    @ApiModelProperty(value = "来源系统")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String sourceProvider;
    /**
     * 服务名称
     */
    @ApiModelProperty(value = "服务名称")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {Simple.class})
    @Size(max = 255, message = "服务名称长度不能超过255")
    private String serviceName;
    /**
     * 服务编号
     */
    @ApiModelProperty(value = "服务编号")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Size(max = 64, message = "服务编号长度不能超过64")
    private String serviceNo;
    /**
     * 服务图片
     */
    @ApiModelProperty(value = "服务图片")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Size(max = 255, message = "服务图片长度不能超过255")
    private String picUrl;
    /**
     * 服务分类id
     */
    @ApiModelProperty(value = "服务分类id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long serviceCategoryId;
    /**
     * 计量单位 字典维护
     */
    @ApiModelProperty(value = "计量单位 字典维护")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Size(max = 255, message = "计量单位 字典维护长度不能超过255")
    private String calUnit;
    /**
     * 最小预定量
     */
    @ApiModelProperty(value = "最小预定量")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer minAllocatedNum;
    /**
     * 服务部门id/服务商id/主场id
     */
    @ApiModelProperty(value = "服务部门id/服务商id/主场id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long serviceProviderId;

    @ApiModelProperty(value = "服务部门名称/服务商名称/主场名称")
    private String serviceProviderName;
    /**
     * 供应商类型 字典维护
     */
    @ApiModelProperty(value = "供应商类型 字典维护")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Size(max = 255, message = "供应商类型 字典维护长度不能超过255")
    private String serviceProviderType;
    /**
     * 服务状态  #{DEFAULT:默认;ON_SHELVES:已上架;UNDER_SHELVES:已下架}
     */
    @ApiModelProperty(value = "服务状态  #{DEFAULT:默认;ON_SHELVES:已上架;UNDER_SHELVES:已下架}")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Dict(dicCode = "SERVICE_STATE")
    private ServiceItemServiceStateEnum serviceState;
    /**
     * 审核状态 #{DEFAULT:默认;APPROVED:已审核;NOT_APPROVED:未审核}
     */
    @ApiModelProperty(value = "审核状态 #{DEFAULT:默认;APPROVED:已审核;NOT_APPROVED:未审核}")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Dict(dicCode = "AUDIT_STATE")
    private ServiceItemAuditStateEnum auditState;
    /**
     * 服务附件
     */
    @ApiModelProperty(value = "服务附件")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<AttachmentFileVO> attachmentFileVOList;
    /**
     * 服务明细
     */
    @ApiModelProperty(value = "服务明细")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<ServiceItemDetailVO> serviceItemDetailVOList;
    /**
     * 服务库存
     */
    @ApiModelProperty(value = "服务库存")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<ServiceInventoryVO> serviceInventoryVOList;
    /**
     * 服务折扣
     */
    @ApiModelProperty(value = "服务折扣")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<ServiceItemDiscountVO> serviceItemDiscountVOList;

    /**
     * 服务分类名称
     */
    @ApiModelProperty(value = "服务分类名称")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String serviceCategoryName;
    /**
     * 场馆综合展会ID
     */
    @ApiModelProperty(value = "场馆综合展会ID")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long exhibitionManageId;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime createTime;

    /**
     * 审核人
     */
    @ApiModelProperty(value = "审核人")
    private Long auditBy;

    /**
     * 审核人姓名
     */
    @ApiModelProperty(value = "审核人姓名")
    private String auditByName;
    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    private LocalDateTime auditTime;

    /**
     * 订单量
     */
    @ApiModelProperty(value = "订单量")
    private Integer orderNum;

    /**
     * 附加费
     */
    @ApiModelProperty(value = "附加费")
    private BigDecimal surcharge;

    /**
     * 预订数量
     */
    @ApiModelProperty(value = "预订数量")
    private Long bookingNum;

    /**
     * 服务部门集合
     */
    @ApiModelProperty(value = "服务部门集合")
    private List<ServiceItemOrgVO> serviceItemOrgList;

    public interface Simple {
    }
}
